package com.vma.jifu.advertisement.service.impl;

import com.vma.jifu.advertisement.service.AdvertisementService;
import com.vma.jifu.bizModel.model.Advertisement;

import java.util.List;

/**
 * Created by chenzui on 2017/6/15.
 */
public class AdvertisementServiceImpl implements AdvertisementService {

    public List<Advertisement> qryAdList() {
        return Advertisement.dao.find("SELECT * FROM advertisement WHERE is_delete = 0 AND status = 1 LIMIT 5");
    }

    public Advertisement getAdById(Integer id) {
        return Advertisement.dao.findById(id);
    }
}
